package cn.exrick.xboot.flow.service;

import cn.exrick.xboot.common.vo.Result;
import cn.exrick.xboot.flow.entity.FlowInstanceinfo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import cn.exrick.xboot.flow.entity.FlowTaskInstance;
import cn.exrick.xboot.flow.entity.FlowTemplateinfo;

import java.util.List;

/**
 * <p>
 * 任务实例表 服务类
 * </p>
 *
 * @author zy
 * @since 2022-08-31
 */
public interface IFlowTaskInstanceService extends IService<FlowTaskInstance> {

    /**
     * 分页查询
     *
     * @param bootStrapTable
     * @param flowTaskInstance
     * @return
     */
    IPage<FlowTaskInstance> selectPage(Page<FlowTaskInstance> page, FlowTaskInstance flowTaskInstance);

    List<FlowTaskInstance> selectList(FlowTaskInstance flowTaskInstance);

    Result<Object> addFlowTaskInstance(FlowInstanceinfo flowInstanceinfo,
                             FlowTemplateinfo flowTemplateinfo,Integer level);

    Result<Object> approval(String flowInstanceId, String opinion);

    FlowTaskInstance getFlowTaskInstanceByFlowInstance(String flowInstanceId);
}